package core

import "context"

type ConsulRegistrar struct {
	conf *ClusterConf
}

func NewConsulRegistrar() (registrar *ConsulRegistrar, err error) {
	registrar = &ConsulRegistrar{}

	return registrar, nil
}
func (registrar *ConsulRegistrar) Close() {
	if registrar == nil {
		return
	}

}
func (registrar *ConsulRegistrar) Register(ctx context.Context, node *Node) error {
	return nil
}
func (registrar *ConsulRegistrar) Deregister(ctx context.Context, node *Node) error {
	return nil
}

//func (adapter *ConsulAdapter) Connect(conf *ClusterConf) (err error) {
//	fmt.Println("consul connected")
//	return err
//}
//
//func (adapter *ConsulAdapter) Register(nodeName string, bindAddr string, watch RegisterWatch) (nodeId uint32, err error) {
//	adapter.watch = watch
//	return
//}
//
//func (adapter *ConsulAdapter) DeRegister() {
//
//}
//func (adapter *ConsulAdapter) GetNodes() (nodes []*Node, err error) {
//	return
//}
